package com.express.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.express.dao.mapper.BaseMapper;

@Service
public class BaseService<T, TExample> {
	@Autowired
	private BaseMapper<T, TExample> baseMapper;
	
	public int insert(T record){
		return baseMapper.insert(record);
	}
	
	public int insertSelective(T record){
		return baseMapper.insertSelective(record);
	}
	
	public int updateByPrimaryKeySelective(T record){
		return baseMapper.updateByPrimaryKeySelective(record);
	}
	
	public T selectByPrimaryKey(Integer id){
		return baseMapper.selectByPrimaryKey(id);
	}
	
	public List<T> selectByExample(TExample example){
		return baseMapper.selectByExample(example);
	}
	
}
